Optimal. Leaf size=303 \[ \frac {2 (a-b) \sqrt {a+b} \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}+\frac {2 b \sqrt {a+b} \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}-\frac {2 a \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 303, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.219, Rules used = {4127, 4001,
3869, 12, 3922, 3917, 4089} \begin {gather*} \frac {2 b \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d}+\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d}-\frac {2 a \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3869
Rule 3917
Rule 3922
Rule 4001
Rule 4089
Rule 4127
Rubi steps
\begin {align*} \int \frac {a^2-b^2 \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx &=-\int (-a+b \sec (c+d x)) \sqrt {a+b \sec (c+d x)} \, dx\\ &=a^2 \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx-\int \frac {b^2 \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 a \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}-b^2 \int \frac {\sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 a \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}+b^2 \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx-b^2 \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}+\frac {2 b \sqrt {a+b} \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}-\frac {2 a \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 15.65, size = 939, normalized size = 3.10 \begin {gather*} -\frac {4 b \cos (c+d x) (b+a \cos (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \sin (c+d x)}{d \left (a^2-2 b^2+a^2 \cos (2 c+2 d x)\right ) \sqrt {a+b \sec (c+d x)}}-\frac {4 \sqrt {b+a \cos (c+d x)} \left (a^2-b^2 \sec ^2(c+d x)\right ) \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (-a b \sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}-b^2 \sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}+a b \sqrt {\frac {-a+b}{a+b}} \tan ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}-b^2 \sqrt {\frac {-a+b}{a+b}} \tan ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}+2 i a^2 \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+2 i a^2 \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+i (a-b) b E\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-i \left (a^2-b^2\right ) F\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}\right )}{\sqrt {\frac {-a+b}{a+b}} d \left (a^2-2 b^2+a^2 \cos (2 c+2 d x)\right ) \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+b \sec (c+d x)} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^{3/2} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1019\) vs.
\(2(276)=552\).
time = 0.22, size = 1020, normalized size = 3.37
method | result | size |
default | \(\text {Expression too large to display}\) | \(1020\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a - b \sec {\left (c + d x \right )}\right ) \sqrt {a + b \sec {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} -\int -\frac {a^2-\frac {b^2}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________